Image data processing method and apparatus, storage medium product, and program product

ABSTRACT

When printing image data obtained by an input device, the present invention is intended to effectively utilize the color reproduction area of the printer. An image data processing method of the present invention comprises the steps of scale-down shifting a first color space point outside a maximum color reproduction area of an output unit to a second color space point within the maximum color reproduction area of the output unit; computing an amount of shift by which the first color space point is shifted to the second color space point; converting the second color space point to a third color space point within a color reproduction area smaller than the maximum color reproduction area of the output unit; and outputting an image to the output unit using image data obtained by scale-up shifting the third color space point to a fourth color space point within the maximum color reproduction area of the output unit based on the computed shift amount.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image data processing method andapparatus, a storage medium product, and a program product.

2. Description of the Related Art

Recently, with an improvement of performance and more widespread use ofinput devices such as digital still cameras, digitization ofphotographic images has become easier and opportunities of handlingphotograph-like images as digital data on, particularly, personalcomputers have increased. In addition, it has also become possible toprocess and edit photograph-like images on personal computers usingvarious kinds of application software.

On the other hand, the full-color hard copy technology has also rapidlydeveloped. Particularly, in the ink jet printing technology, printquality has improved to a level comparable to that of silver-saltphotographs with development of a technique for reducing a particulatetexture attributable to ink dots. Then, the ink jet printing technologyhas received greater popularity because it has not only improved imagequality, but also is a comparatively simple printing method.

Image data taken in by input devices such as digital still cameras isrecorded in predetermined storage means in various signal forms andformats.

In the case of digital still cameras, the JPEG format is used forrecording most images and images are stored in the form ofluminance/color-difference data (YCbCr data).

While the data form widely used in general is RGB data, the relationshipexpressed by the following formulae in conformity with ITU-R BT.601exists between RGB data and YCbCr data:Y=0.299×R+0.587×G+0.114×BCb=(−0.299×R−0.587×G+0.886×B)×0.564+kCr=(0.701×R−0.587×G−0.114×B)×0.713+k  (Formulae 1-1)R=Y+((Cr−k)×1.4020)G=Y−((Cb−k)×0.3441)−((Cr−k)×0.7139)B=Y+((Cb−k)×1.7718)  (Formulae 1-2)wherein each of Cb and Cr takes a positive and negative value, each ofR, G and B takes a value ranging from 0 to 255 when data is handled asan 8-bit value, and k is a value of 128.

Further, when YCbCr data is converted to RGB data, a converted data maytake a value other than 0 to 255, and therefore a saturation process isexecuted such that values less than 0 are clipped to 0 and values largerthan 255 are clipped to 255.

In general, RGB data is processed in 8 bits for each color. Accordingly,when image data is displayed on a display device such as a CRT monitor,colors represented by data having values of 0 to 255 for each of RGB canbe only reproduced.

As a color space used for color matching, there is an SRGB color space(IEC 61966-2-1, ITU-R BT.709), which is specified in consideration ofcharacteristics of a CRT monitor.

Then, it is a recent trend to handle values of 0 to 255 for each of RGBas SRGB color-space data because the SRGB color space has become astandard color space for universal operating systems used in personalcomputers for the purpose of color standardization among devices.

However, an actual scene has of course a larger color reproduction areathan a display device, such as a CRT monitor, and in some regions of thecolor space a color reproduction area reproduced by a printer device islarger than that reproduced by a display device, such as a CRT monitor.

FIG. 9 is an xy chromaticity diagram showing color reproduction areas.In FIG. 9, numeral 901 denotes the sRGB color space, and 902 denotesarbitrary color points that can be reproduced by a printer.

The SRGB color space employed as a standard color space in many casesdoes not always completely involve the color reproduction areas of inputand output devices. In other words, as seen from FIG. 9, a part of thecolor area reproducible by the printer is lost when an image isprocessed as sRGB color-space data.

In digital still cameras, therefore, a color signal obtained by a sensoris subjected to a predetermined process for mapping to the SRGB colorspace and then conversion to YCrCb data. In some cases, however, valuesof SRGB data are equivalently extended to a negative value less than 0or a value larger than 255 for improving color reproducibility ofdisplay devices other than ones using the SRGB color space. A maximumcolor area in those cases is given as a color area defined bylimitations (0≦Y≦255 and −128≦CbCr≦127) imposed on 8-bit YCbCr signals,and the color reproduction area is sometimes extended to a full limit ofthe maximum color area.

As described above, when image data is converted to the SRGB colorspace, some colors reproducible by a printer are lost. In such a case,when image data input from an input device is output to a displaydevice, such as a CRT monitor, after conversion to sRGB, the image datais reproduced as a satisfactory image free from defects when viewed on amonitor screen. However, when the image data converted to sRGB anddisplayed on the CRT monitor or the like is printed out by a printer,proper colors are not reproduced because information regarding colorscontained in an original image (image data input from the input device)is partly lost in the process of displaying the image on the CRT monitor(i.e., upon conversion to SRGB).

On the other hand, when image data input from an input device is printedout after being converted to the extended color space 903, shown in FIG.9, so as to fully involve the color reproduction area of a printer,printing can be performed using information contained in an originalimage. However, the image data converted to the extended color spacecannot be properly displayed when output to a display device, such as aCRT monitor, because the extended color space is not a color space inconsideration of characteristics of the CRT monitor.

SUMMARY OF THE INVENTION

In view of the state of the art mentioned above, it is an object of thepresent invention to provide an image data processing method andapparatus, which can (1) satisfactorily display image data obtained froman input device on a CRT monitor, and (2) print the input image datawith high quality by converting it to image data allowing the colorreproduction area of a printer to be-effectively utilized. The presentinvention also provides a storage medium product and a program productfor practically implementing the image data processing method andapparatus.

To achieve the above object, the image data processing method andapparatus of the present invention has features given below.

According to one aspect of the present invention, an image dataprocessing method comprises the steps of scale-down shifting a firstcolor space point outside a maximum color reproduction area of an outputunit to a second color space point within the maximum color reproductionarea of the output unit; computing an amount of shift by which the firstcolor space point is shifted to the second color space point; convertingthe second color space point to a third color space point within a colorreproduction area smaller than the maximum color reproduction area ofthe output unit; and outputting an image to the output unit using imagedata obtained by scale-up shifting the third color-space point to afourth color space point within the maximum color reproduction area ofthe output unit based on the computed shift amount.

According to another aspect of the present invention, an image dataprocessing method comprises the steps of determining whether image datatakes a value outside a preset area; if a determination result in theabove step shows that the image data is outside the preset area,scale-down shifting a first color space point outside a maximum colorreproduction area of output means to a second color space point withinthe maximum color reproduction area of the output unit; computing anamount of shift by which the first color space point is shifted to thesecond color space point; converting the second color space point to athird color space point within a color reproduction area smaller thanthe maximum color reproduction area of the output unit; and outputtingan image to the output unit using image data obtained by scale-upshifting the third color space point to a fourth color space pointwithin the maximum color reproduction area of the output unit based onthe computed shift amount.

Further objects, features and advantages of the present invention willbecome apparent from the following description of the preferredembodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a schematic configuration of an imagedata processing system according to one embodiment of the presentinvention.

FIG. 2 is a block diagram showing an outline of image data processingexecuted by application software in one embodiment of the presentinvention.

FIG. 3 is a flowchart of a process for conversion to data based on acolor space equivalent to the color reproduction area of a printer inone embodiment of the present invention.

FIG. 4 shows a configuration of a look-up table for correction of colormatching in one embodiment of the present invention.

FIG. 5 shows a configuration of a look-up table for correction of colormatching in another embodiment of the present invention.

FIG. 6 is an explanatory view showing a conversion process on a YCbCrspace in still another embodiment of the present invention.

FIG. 7 is another explanatory view showing a conversion process on aYCbCr space in still another embodiment of the present invention.

FIG. 8 is a block diagram showing an outline of image data processingexecuted by application software in still another embodiment of thepresent invention.

FIG. 9 is a chromaticity diagram showing color reproduction areas.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the present invention will be described below in detailwith reference to the drawings.

First Embodiment

FIG. 1 is a block diagram showing a schematic configuration of an imagedata processing system according to one embodiment of the presentinvention.

This system mainly comprises a host computer 1, an ink jet printer 6,and a display 7. The ink jet printer 6 and the display 7 are connectedto the host computer 1 in a two-way communicating manner.

The host computer 1 includes an OS (Operating System) 3 and applicationsoftware 2, such as photo-retouch and layout, for executing respectiveprocessing under management of the OS 3. Also, the host computer 1includes, in the form of software, a printer driver 4 for processing agroup of various drawing commands (e.g., an image drawing command, atext drawing command, and a graphic drawing command), which are issuedfrom the application software 2 and represent an output image, therebycreating printing data, and a display driver 5 for processing a group ofvarious drawing commands, which are also issued from the applicationsoftware 2, thereby displaying an image on the display 7.

Further, the host computer 1 includes, as various hardware unitsoperable by the above-mentioned software, a central processing unit(CPU) 9, a hard disk driver 8, a random access memory (RAM) 10, a readonly memory (ROM) 11, an input interface 14, etc. More specifically, theCPU 9 executes signal processing required in processes executed by theabove-mentioned software. A hard disk (HD) 12 driven by the hard diskdriver 8 stores not only image data photographed by a digital stillcamera, for example, but also the above-mentioned software. The ROM 11also stores the above-mentioned software in advance so that desired oneof the software is read out as required. The RAM 10 is used as, forexample, a work area for execution of the signal processing by the CPU9. Further, an input entered from an input device 13, such as a mouse ora keyboard, is input to the OS 3 through the input interface 14 and issubjected to the processing executed by the OS 3.

Image data from an image input device, e.g., a digital still camera, canbe transferred to the hard disk (HD) 12 in the host computer 1 throughthe input interface 14 by using a reader for a memory disk or a memorycard, cable connection, or infrared communication or wirelesscommunication. As a matter of course, a digital still camera and thehost computer 1 may be interconnected via cable connection, infraredcommunication or wireless communication, and image data may be directlyread and processed from a memory card or a built-in memory held in animage input device, e.g., a digital still camera, without transferringthe image data to the hard disk (HD) 12 in the host computer 1.

In the system constructed as described above, a user is able to create,based on an image displayed on the display 7 by the application software2, image data made up of, e.g., text data classified into a text, suchas characters, through the processing in accordance with theapplication, graphics data classified into graphics, such as figures,and image picture data classified into a photographic image photographedby a digital still camera, for example.

When printing-out of the thus-prepared image data is instructed by theuser, the application software 2 gives a printing-out request to the OS3, and issues, to the OS 3, a group of drawing commands representing anoutput image and constructed such that graphics data portions arerepresented by graphics drawing commands and image picture data portionsare represented by image drawing commands. Correspondingly, the OS 3receives the printing-out request from the application software 2 andissues the group of drawing commands to the printer driver 4corresponding to the printer 6 that is appointed to make theprinting-out. Generally, the image drawing command is represented using8-bit data for each color in many cases.

The printer driver 4 processes the printing-out request and the group ofdrawing commands both input from the OS 3, creates printing data in theform printable by the printer 6, and transfers the created data to theprinter 6. When the printer 6 is a raster printer, the printer driver 4successively executes an image correction process for the drawingcommands from the OS 3, and rasterises the drawing commands in an RGB24-bit page memory (8 bits for each of R, G and B). After rasterisingall of the drawing commands, the contents of the RGB 24-bit page memoryare converted to the data form printable by the printer 6, e.g., CMYKdata, and then transferred to the printer 6.

Display of an image on the display 7 is executed in a similar manner.More specifically, the OS 3 issues the group of drawing commands to thedisplay driver 5. The display driver 5 converts the group of drawingcommands to signal data in the form displayable on the display 7 andthen transfers the signal data to the display 7.

While values larger than 8-bit ones are used in some of the applicationsoftware and various computing processes, those values larger than 8-bitones cannot be sometimes used in drawing instructions because of, e.g.,restrictions imposed on the OS 3. RGB values handled in consideration ofversatility fall within the range of 8-bit values for each color in manycases.

FIG. 2 is a block diagram showing an outline of image data processingexecuted by application software in one embodiment of the presentinvention.

The following description is made of details of processing in whichYCbCr data can be read as image data.

An image file 201, in which image data has been recorded by an inputdevice 213, e.g., a digital still camera, is read by a file readingsection 202.

The reading of the image file 201 can be performed via the host computerthrough the input interface by using a reader for a memory disk or amemory card, cable connection, or infrared communication or wirelesscommunication. As a matter of course, the input device 213, e.g., adigital still camera, and the host computer may be interconnected viacable connection, infrared communication or wireless communication, andimage data may be directly read and processed from a memory card or abuilt-in memory held in the image input device 213, e.g., a digitalstill camera.

Image data is recorded in various formats and is often recorded incompressed form for reducing the data amount. The file reading section202 has the function of analyzing the data form and decompressing thecompressed data to obtain desired image data.

Luminance/color-difference data (YCbCr data) is read by a YCbCr readingsection 203 and then converted to Y′Cb′Cr′ data in an image correctionprocessing section 205 through correction processing for brightness,contrast, color balance, etc. The contents of the correction processingare instructed from a user interface 204. By performing the imageconversion of image data in the form of YCbCr data, the correctionprocessing can be made on proper color reproduction information oforiginal image data without being affected by data loss that may occurupon conversion to 8-bit RGB data.

The Y′Cb′Cr′ data having been subjected to the image correctionprocessing is converted to RGB data in a YCbCr-to-RGB converting section(1) 206. The conversion to RGB data is performed based on theabove-mentioned formulae 1-2. At this time, since the RGB data ishandled as 8-bit data for each color, a saturation process is executedsuch that values less than 0 are clipped to 0 and values larger than 255are clipped to 255.

A color space of the converted RGB data is handled as an sRGB colorspace. In other words, image data in the standardized sRGB color spaceis obtained.

On the other hand, the Y′Cb′Cr′ data is converted to 8-bit R′G′B′ datain a YCbCr-to-RGB converting section (2) 207. The R′G′B′ data is databased on a color space equivalent to the color reproduction area of theprinter, and enables printing to be performed with full utilization ofthe color reproduction area reproducible by the printer. Details of theconversion from Y′Cb′Cr′ data to R′G′B′ data will be described later(with reference to FIG. 3).

In the case employing the R′G′B′ data, the so-called color matchingcorrection, which has been performed in conventional printers, is notperformed in a printer driver 211.

The converted RGB data is sent to a display driver 209 through a drawinginterface 208 and then displayed on a display 210.

On the other hand, the converted R′G′B′ data is sent to the printerdriver 211 through the drawing interface 208 and then printed out by aprinter 212.

Through the above-described conversion, RGB data prepared as sRGBcolor-space data is provided to the display 210, and R′G′B′ dataprepared as data based on an extended color space equivalent to thecolor reproduction area of a relevant printer is provided to the printer212, whereby image data suitable for respective devices can be obtained.As a result, color characteristics of an original image can be outputand reproduced while minimizing loss of colors.

FIG. 3 is a flowchart of a process (207 in FIG. 2) for conversion todata based on a color space equivalent to the color reproduction area ofa printer in one embodiment of the present invention.

First, an R₀G₀B₀→R₁G₁B₁ table is read in step S301.

Generally, the printer driver 211 converts RGB data into CMYK data,i.e., the printable form, based on the following formulae 2-1 and 2-2,and sends the CMYK data to the printer:C ₀=255−RM ₀=255−GY ₀=255−B  (Formulae 2-1)K=min(C ₀ ,M ₀ ,Y ₀)C=C ₀ −KM=M ₀ −KY=Y ₀ −K  (Formulae 2-2)

Each of R, G, B, C, M, Y and K in the above formulae 2-1 and 2-2 takesan 8-bit value ranging from 0 to 255.

Instead of the arithmetic conversion using the above formulae 2-1 and2-2, the conversion from RGB to CMYK may be performed using a lookuptable representing the relationship between RGB values and CMYK values.

FIG. 4 shows one example of the R₀G₀B₀→R₁G₁B₁ table. This R₀G₀B₀→R₁G₁B₁table is a lookup table for color matching correction, in which R₀G₀B₀and R₁G₁B₁ are correlated with each other such that the color originallyintended by R₀G₀B₀ data substantially matches with the color resultingwhen R₁G₁B₁ data is converted to CMYK data and then printed out by theprinter.

The lookup table holds, for example, the discrete relationship betweenR₀G₀B₀ and R₁G₁B₁ corresponding to 17×17×17 points resulting fromdividing values of 0 to 255 in units of 16 steps for each color. Valuesbetween 17 points for each of RGB are computed by interpolation usingthe respective values of R₀G₀B₀ and R₁G₁B₁ at the 17×17×17 points.

As shown in FIG. 4, when values of R₀G₀B₀ are (0, 0, 0), convertedvalues of R₁G₁B₁ are (a1, a2, a3). Likewise, when values of R₀G₀B₀ are(0, 0, 16), converted values of R₁G₁B₁ are (b1, b2, b3), and when valuesof R₀G₀B₀ are (128, 64, 16), converted values of R₁G₁B₁ are (c1, c2,c3). When values of R₀G₀B₀ are (255, 255, 255), converted values ofR₁G₁B₁ are (d1, d2, d3).

The values of (a1, a2, a3), (b1, b2, b3), (c1, c2, c3) and (d1, d2, d3)are ones ranging from 0 to 255 which are defined, as mentioned above,such that the color originally intended by RoG₀B₀ data substantiallymatches with the color resulting when R₁G₁B₁ data is converted to CMYKdata and then printed out by the printer.

Also, since the R₀G₀B₀→R₁G₁B₁ table shown in FIG. 4 is prepared by on anassumption of regarding the R₀G₀B₀ data as sRGB color-space data, thevalues of the R₁G₁B₁ data are set such that color matching is achievedbetween the results of printing-out and sRGB.

The above-described color matching correction is usually performed inthe printer driver 211, and therefore the R₀G₀B₀→R₁G₁B₁ table is held inthe printer driver 211 for the printer 212.

Accordingly, the R₀G₀B₀→R₁G₁B₁ table is read from the printer driver211. However, the table is not always required to be read from theprinter driver 211, and can be read from any predetermined place whereit is prepared.

Then, Y₀Cb₀Cr₀ data is read in step S302, and the read Y₀Cb₀Cr₀ data isconverted to R₀G₀B₀ data in step S303. This conversion is performedbased on the above-mentioned formulae 1-2, and converted data can takevalues other than 8-bit ones. In other words, the R₀G₀B₀ data can take avalue less than 0 or larger than 255. At this time, the saturationprocess of clipping the R₀G₀B₀ data less than 0 or larger than 255 tovalues falling within the range of 0 to 255 is not performed.

In step S304, it is determined whether the R₀G₀B₀ data converted in stepS303 satisfies 0≦R₀≦255, 0≦G₀≦255 and 0≦B₀≦255 (hereinafter expressed as0≦R₀G₀B₀≦255 for brevity). If the R₀G₀B₀ data satisfies 0≦R₀G₀B₀≦255,the process flow goes to step S312 in which the R₀G₀B₀ data is convertedto R₁G₁B₁ data using the R₀G₀B₀≦R₁G₁B₁ table.

As a result of the determination in step S304 as to whether the R₀G₀B₀data converted in step S303 satisfies 0≦R₀G₀B₀≦255, if the R₀G₀B₀ datadoes not satisfy 0≦R₀G₀B₀≦255, the process flow goes to step S305 inwhich the R₀G₀B₀ data is converted to the original Y₀Cb₀Cr₀ data. Thisconversion is performed based on the above-mentioned formulae 1-1.

Then, in step S306, the Y₀Cb₀Cr₀ data is subjected to mapping(scale-down shift) to values in a YCbCr space expressible by 8-bitvalues for each color of RGB, and an amount of the shift (scale) L iscomputed.

FIG. 6 shows a YCbCr space. In FIG. 6, the vertical axis Y representsluminance, and the horizontal axis C represents hue and saturation. Theillustrated graph represents a section at arbitrary values of Cb and Cr.A solid line 601 indicates an area expressible by 8-bit values for eachcolor of RGB.

The YCbCr space indicated by the solid line 601 is obtained from the RGBvalues falling within the range of 0 to 255 based on the above-mentionedformulae 1-1; namely, it is obtained from combinations of the RGB valuesof 0 to 255. It can be therefore said that the YCbCr space indicated bythe solid line 601 matches with the color reproduction space of theprinter.

The Y₀Cb₀Cr₀ data converted in step S305 is given as, for example, apoint PI1 outside the area expressible by 8-bit values for each color ofRGB. Then, a shift point (mapping point) is determined for a shift fromthe PI1 point to a point PI2 within the area expressible by 8-bit valuesfor each color of RGB on the YCbCr space shown in FIG. 6. Statedotherwise, for a shift from PI1 to PI2, the point PI2 providing the samehue while preserving the luminance of PI1 is computed as the mappingpoint. At this time, the shift amount (scale) L from PI1 to PI2 iscomputed.

Subsequently, R₀G₀B₀ values of the mapping point PI2 are determined instep S307. The computation from the YCbCr values of the mapping pointP12 to the R₀G₀B₀ values is performed based on the above-mentionedformulae 1-2.

Then, R₁G₁B₁ data is determined from the R₀G₀B₀→R₁G₁B₁ table in stepS308.

Further, the R₁G₁B₁ data is converted to Y₁Cb₁Cr₁ data in step S309.This conversion from R₁G₁B₁ to Y₁Cb₁Cr₁ is performed based on theabove-mentioned formulae 1-1.

FIG. 7 shows a YCbCr space. In FIG. 7, as with FIG. 6, the vertical axisY represents luminance, and the horizontal axis C represents hue andsaturation. The illustrated graph represents a section at arbitraryvalues of Cb and Cr. A solid line 601 indicates an area expressible by8-bit values for each color of RGB. The YCbCr space indicated by thesolid line 601 is obtained from the RGB values falling within the rangeof 0 to 255 based on the above-mentioned formulae 1-1; namely, it isobtained from combinations of the RGB values of 0 to 255. It can betherefore said that the YCbCr space indicated by the solid line 601matches with the color reproduction space of the printer. On the otherhand, a dotted line 602 represents an area reproducible when the printerperforms color matching correction based on the R₀G₀B₀-to-R₁G₁B₁ table.

Since the R₀G₀B₀-to-R₁G₁B₁ table is prepared in consideration of thatthe color matching is performed on an assumption of regarding the R₀G₀B₀data as sRGB color-space data, the YCbCr color-space area indicated bythe dotted line 602 is narrower than the YCbCr color-space areaindicated by the solid line 601.

As described above in connection with the related art by referring toFIG. 9, the color reproduction area of the printer is larger than thatreproducible using sRGB. With execution of the color matching, however,the R₁G₁B₁ values are not always prepared by using all values of 0 to255. In other words, the R₁G₁B₁ values provide the color reproductionarea narrower than that reproducible by the printer, and the performanceof the printer is not fully utilized. For that reason, the Y₁Cb₁Cr₁ datadetermined in step S309 is subjected to signal conversion so that thedead capacity of the printer performance can be effectively utilized.More specifically, color reproducibility is improved by the followingmethod to a full limit of the color reproducible area of the printer inconsideration of the shift amount L determined in step S306.

In FIG. 7, PO1 is assumed to be one example point of the Y₁Cb₁Cr₁ datadetermined in step S309. The point PO1 is subjected to scale-up shiftcorresponding to the distance (scale) L (i.e., enlargement of the colorreproduction area), thereby obtaining a point PO2. Then, Y₂Cb₂Cr₂ dataat the point PO2 is determined.

In the above process, the point PO2 resulting from the area enlargementcorresponding to the distance (scale) L may be sometimes positionedoutside the area indicated by the solid line 601. In such a case, anoutermost point, which contacts the solid line 601 upon shift of thepoint PO2 for the area enlargement, is defined as the point PO2.Alternatively, the point PO2 may be determined by setting apredetermined amount n and reducing an amount of enlargement as definedby L×n so that PO2 is kept within the area indicated by the solid line601 depending on the distance (scale) L.

When enlarging the color reproduction area, as with the abovescaling-down process, PO1 is shifted at the same hue while preservingthe luminance. Assuming that the shift amount resulting when one of alldata, which provides a maximum shift amount, is shifted to PO2 whilepreserving the same luminance and hue, is m, the predetermined amount nis given by n=m/L. As a result, one of all data, which provides themaximum shift amount, is shifted to a position on the solid line 601while preserving the luminance and the hue, and other data is alsoshifted at the same shift rate as that at which the data providing themaximum shift amount is actually shifted.

Accordingly, all the data is shifted to the area within the solid line601 while preserving the luminance and the hue.

The reason why PI2 determined in step S306 is subjected to theabove-described enlarging process after being converted to PO1 throughsteps S307 to S309 resides in that the hue of the input point PI2 is notalways the same as the hue of the output point PO1 because of the effectof the color matching process. More specifically, the input point PI2 isa theoretical value, whereas the output point PO1 is a point determinedfrom the RGB values for causing the printer to print out the intendedcolor. The hue printed out by the printer after being subjected to theprocessing using the R₀G₀B₀→R₁G₁B₁ table, which is prepared inconsideration of preferred color reproducibility instead of absolutecolor matching, is not always in agreement with the theoretical hue.

For that reason, the process of determining the hue of the point PO1within the dotted line 602 and then enlarging the color reproductionarea toward the solid line 601 is executed so that the determined pointPO2 provides a color smoothly continuing with the hue within the dottedline 602 (namely the same hue is preserved).

Finally, the Y₂Cb₂Cr₂ data at the point PO2 determined in step S310 isconverted to R₂G₂B₂ data in step S311. This conversion is performedbased on the above-mentioned formulae 1-2.

With this first embodiment, colors represented by the RGB values, whichare obtained from the Y₀Cb₀Cr₀ data and fall within the range of 0 to255, are reproduced as ones within the color reproduction area indicatedby the dotted line 602 in FIG. 7. Also, colors represented by the RGBvalues, which are obtained from the YoCb′Cr′ data and fall outside therange of 0 to 255, are reproduced as ones using the color reproductionarea indicated by the solid line 601 in FIG. 7. As a result, an imagecan be printed while fully utilizing the color reproduction area of theprinter.

Also, the above-described process imposes no effects upon the colorreproduction performance achieved with the R₀G₀B₀→R₁G₁B₁ table preparedfor the color matching.

Further, when printing an image with the system of this firstembodiment, a part of information regarding colors contained in theoriginal image, which has been lost in the past, is employed so that theimage can be printed while effectively utilizing the full colorreproduction area of the printer.

While the conversion is made on the YCbCr space data in this firstembodiment, a utilizable color space is not limited to the YCbCr space.The above-described conversion process may be performed on image databased on other color spaces, such as HSV and L*a*b*, for fully utilizingthe color reproduction area of the printer.

The system configuration of this first embodiment may be modified suchthat the above-described data processing is executed without using anypersonal computer by providing the data processing section 201 to 212,shown in FIG. 2, inside the printer. In such a case, image data can beread using a reading unit, e.g., a card reader provided in the printer,via a memory card. Alternatively, an input device, e.g., a digital stillcamera, can be connected to the printer via a wired cable, infraredcommunication or wireless communication, thus allowing image data to beread out of a detachable memory card or a built-in memory held in theinput device.

In the above modification in which the data processing section isprovided inside the printer, when a simple liquid crystal monitor isinstalled as a display in the printer, image data can be handled asdifferent sets of color-space data separately, i.e., data used fordisplay on the liquid crystal monitor and data used for printing.

The first embodiment has been described in connection with a digitalstill camera as one example of the input device, but the applicationfield is not limited to the digital still camera. The present inventionis also applicable to other input devices such as a digital video camera(digital cam coder), an image scanner, and a film scanner.

It is to be noted that the present invention is not limited to theabove-described first embodiment, but can be variously modified withoutdeparting from the scope of the present invention.

Second Embodiment

This second embodiment differs from the above first embodiment in that,in the system shown in FIG. 1, an image data processing configurationshown in FIG. 8, for example, is employed instead of the image dataprocessing configuration shown in FIG. 2.

The following description is made of only the configuration andoperation of this second embodiment which differ from those of the abovefirst embodiment.

While the conversion to the R′G′B′ data in the YCbCr-to-RGB convertingsection (2) 207 is implemented with computation in the above firstembodiment, it is implemented using a conversion table in this secondembodiment.

For executing the conversion using a table, an RGB-to-R′G′B′ dataconverting section 801 is provided in this second embodiment.

A conversion table (1) 802 is in the form of a lookup table that issimilar to that shown in FIG. 4 and employs values in the range of 0 to255 as input R₀G₀B₀ values.

A conversion table (2) 803 is in the form of a lookup table constitutedas shown in FIG. 5.

In FIG. 5, a standard section 500 is constituted by setting the samevalues as those used in the lookup table of FIG. 4. Extended sections501, 502 set therein values corresponding to input R₀G₀B₀ values of lessthan 0 or larger than 255. Lookup tables in the extended sections 501,502 are each completed by setting R₀G₀B₀ values in advance and thensetting, as R₁G₁B₁ values, results of the computation made in theprocessing of steps S305 to S311 in the flowchart of FIG. 3 describedabove in connection with the first embodiment.

When all of image data resulting from processing of the conversion toRGB data made in the YCbCr-to-RGB converting section (2) 207 based onthe above-mentioned formulae 1-2 is in the range of 0≦RGB≦255, theconversion to R′G′B′ data is performed using the conversion table (1).When the image data resulting from processing of the conversion to RGBdata takes a value less than 0 or larger than 255, the conversion toR′G′B′ data is performed using the conversion table (2).

With this second embodiment, when processing image data represented bythe RGB values which are less than 0 or larger-than 255 and do not fallwithin the range of 8-bit values, an image can be printed while fullyutilizing the color reproducible area of the printer without causing noeffects upon the color reproduction of data represented by the RGBvalues falling within the range of 0≦RGB≦255.

Further, when printing an image with the system of this secondembodiment, it is also possible to perform the image printing whileeffectively utilizing the full color reproduction area of the printer byutilizing a part of information regarding colors contained in theoriginal image, which has been lost in the past.

It is to be noted that the present invention is not limited to theabove-described second embodiment, but can be variously modified withoutdeparting from the scope of the present invention.

As with the above first embodiment, the system configuration of thissecond embodiment may be modified such that the above-described dataprocessing is executed without using any personal computer by providingthe data processing section 201 to 212 and 801 to 803, shown in FIG. 8,inside the printer. In such a case, image data can be read using areading unit, e.g., a card reader provided in the printer, via a memorycard. Alternatively, an input device, e.g., a digital still camera, canbe connected to the printer via a wired cable, infrared communication orwireless communication, thus allowing image data to be read out of adetachable memory card or a built-in memory held in the input device.

In the above modification in which the data processing section isprovided inside the printer, when a simple liquid crystal monitor isinstalled as a display in the printer, image data can be handled asdifferent sets of color-space data separately, i.e., data used fordisplay on the liquid crystal monitor and data used for printing.

This second embodiment has been described in connection with a digitalstill camera as one example of the input device, but the applicationfield is not limited to the digital still camera. The present inventionis also applicable to other input devices such as a digital videocamera, an image scanner, and a film scanner.

As described above in detail, an image data processing method andapparatus can be provided in which when digital image data obtained byan input device, e.g., a digital still camera, is printed using aprinter, the obtained image data is converted to image data enabling thecolor reproduction area of the printer to be effectively utilized, and aphotographic image with high quality can be printed.

Other Embodiments

While the above-described embodiments include hardware, etc., similarfunctions can be realized with software for executing successive dataprocessing steps in sequence. More specifically, a storage medium (or arecording medium), such as a CD, an MD, a memory card or an MO, whichstores program codes of software for realizing the functions of theabove-described embodiments, is supplied to a user. Then, the user setsthe storage medium in a system or an apparatus, causing a computer (CPUor MPU) in the system or the apparatus to read and execute the programcodes stored in the storage medium. The processing executed in theabove-described embodiments can also be achieved in such a manner. Inthat case, the program codes read out of the storage medium serve inthemselves to realize the functions of the above-described embodiments.

Also, the functions of the above-described embodiments are realized notonly by a computer executing the program codes read out of the storagemedium, but also by an Operating System (OS) or the like which isworking on the computer and executes a part or the whole of the actualprocessing in accordance with instructions from the program codes,thereby realizing the functions of the above-described embodiments.

Further, the present invention involves such a case in which the programcodes read out of the storage medium are written in a memory provided ina function add-on card inserted in the computer or a function add-onunit connected to the computer, and a CPU or the like incorporated inthe function add-on card or unit executes a part or the whole of theactual processing in accordance with instructions from the programcodes, thereby realizing the functions of the above-describedembodiments.

While the present invention has been described with reference to whatare presently considered to be the preferred embodiments, it is to beunderstood that the invention is not limited to the disclosedembodiments. On the contrary, the invention is intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims. The scope of the following claims is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures and functions.

1. An image data processing method comprising the steps of: scale-downshifting a first color space point outside a maximum color reproductionarea of output means to a second color space point within the maximumcolor reproduction area of said output means; computing an amount ofshift by which the first color space point is shifted to the secondcolor space point; converting the second color space point to a thirdcolor space point within a color reproduction area smaller than themaximum color reproduction area of said output means; and outputting animage to said output means using image data obtained by scale-upshifting the third color space point to a fourth color space pointwithin the maximum color reproduction area of said output means based onthe computed shift amount.
 2. An image data processing method comprisingthe steps of: determining whether image data takes a value outside apreset area; if a determination result in said step shows that the imagedata is outside the preset area, scale-down shifting a first color spacepoint outside a maximum color reproduction area of output means to asecond color space point within the maximum color reproduction area ofsaid output means; computing an amount of shift by which the first colorspace point is shifted to the second color space point; converting thesecond color space point to a third color space point within a colorreproduction area smaller than the maximum color reproduction area ofsaid output means; and outputting an image to said output means usingimage data obtained by scale-up shifting the third color space point toa fourth color space point within the maximum color reproduction area ofsaid output means based on the computed shift amount.
 3. An image dataprocessing method according to claim 1, wherein said step of convertingthe second color space point to a third color space point within a colorreproduction area smaller than the maximum color reproduction area ofsaid output means is performed using a conversion table for colormatching.
 4. (canceled)
 5. An image data processing apparatuscomprising: means for scale-down shifting a first color space pointoutside a maximum color reproduction area of output means to a secondcolor space point within the maximum color reproduction area of saidoutput means; means for computing an amount of shift by which the firstcolor space point is shifted to the second color space point; means forconverting the second color space point to a third color space pointwithin a color reproduction area smaller than the maximum colorreproduction area of said output means; and means for outputting animage to said output means using image data obtained by scale-upshifting the third color space point to a fourth color space pointwithin the maximum color reproduction area of said output means based onthe computed shift amount.
 6. An image data processing apparatuscomprising: means for determining whether image data takes a valueoutside a preset area; means for, if a determination result by saidmeans shows that the image data is outside the preset area, scale-downshifting a first color space point outside a maximum color reproductionarea of output means to a second color space point within the maximumcolor reproduction area of said output means; means for computing anamount of shift by which the first color space point is shifted to thesecond color space point; means for converting the second color spacepoint to a third color space point within a color reproduction areasmaller than the maximum color reproduction area of said output means;means for scale-up shifting the third color space point to a fourthcolor space point within the maximum color reproduction area of saidoutput means based on the computed shift amount; and means foroutputting an image to said output means using image data at the fourthcolor space point.
 7. An image data processing apparatus according toclaim 6, wherein said means for converting the second color space pointto a third color space point within a color reproduction area smallerthan the maximum color reproduction area of said output means isperformed using a conversion table for color matching.
 8. (canceled) 9.A storage medium product storing a program, said program including thesteps of: scale-down shifting a first color space point outside amaximum color reproduction area of output means to a second color spacepoint within the maximum color reproduction area of said output means;computing an amount of shift by which the first color space point isshifted to the second color space point; converting the second colorspace point to a third color space point within a color reproductionarea smaller than the maximum color reproduction area of said outputmeans; scale-up shifting the third color space point to a fourth colorspace point within the maximum color reproduction area of said outputmeans based on the computed shift amount; and outputting an image tosaid output means using image data at the fourth color space point. 10.A data processing method comprising the steps of: determining whetherdata corresponding to a color signal input from an input device isincluded within an area defined by color matching correction data for aprinter; shifting data, which is not included in said area as a resultof said determining step, to data of the same hue while preservingluminance so that the data after the shift is included in said area;converting the data after the shift using the color matching correctiondata; and enlarging a color reproduction area of the data after theconversion within a color reproducible area of said printer based on anamount of the shift made in said shifting step.
 11. A data processingmethod according to claim 10, wherein the color matching correction datais data used for achieving a match between a color of the datacorresponding to the color signal and a color resulting when the dataafter the conversion using the color matching correction data is printedby said printer.
 12. A data processing method according to claim 10,wherein said enlarging step is performed as conversion to data of thesame hue while preserving luminance of the data after the conversion.13. A data processing method according to claim 10, wherein saidenlarging step is performed within the color reproducible area of saidprinter.
 14. A data processing method according to claim 10, wherein thecolor matching correction data is given in the form of a table holdingdiscrete data values, and values other than the discrete data valuesheld in the table are decided with interpolation based on the discretedata values.
 15. A data processing method according to claim 10, whereinthe color matching correction data is table data in consideration ofinput of sRGB.
 16. A data processing method according to claim 10,wherein the color matching correction data is held in a printer driverfor said printer.
 17. A data processing method according to claim 10,wherein the data included in said area as a result of said determiningstep is printed by said printer after the conversion using the colormatching correction data, and the data not included in said area as aresult of said determining step is printed by said printer after saidenlarging step.
 18. A data processing method according to claim 10,wherein said enlarging step is performed by converting data, which has amaximum shift amount among all the data corresponding to the input colorsignal, to data representing a color reproducible by said printer, andshifting data other than the data having the maximum shift amount usingthe same shift rate as that of the data having the maximum shift amount.19. A data processing method according to claim 10, wherein said inputdevice is one of a digital still camera, a digital video camera, animage scanner, and a film scanner.
 20. A data processing methodaccording to claim 10, wherein said shifting, converting and enlargingsteps are each performed by table conversion.
 21. A data processingapparatus comprising: means for determining whether data correspondingto a color signal input from an input device is included within an areadefined by color matching correction data for a printer; means forshifting data, which is not included in said area as a result of saiddetermining step, to data of the same hue while preserving luminance sothat the data after the shift is included in said area; means forconverting the data after the shift using the color matching correctiondata; and means for enlarging a color reproduction area of the dataafter the conversion within a color reproducible area of said printerbased on an amount of the shift made in said shifting step.
 22. Aprogram product containing a program, said program including the stepsof: determining whether data corresponding to a color signal input froman input device is included within an area defined by color matchingcorrection data for a printer; shifting data, which is not included insaid area as a result of said determining step, to data of the same huewhile preserving luminance so that the data after the shift is includedin said area; converting the data after the shift using the colormatching correction data; and enlarging a color reproduction area of thedata after the conversion within a color reproducible area of saidprinter based on an amount of the shift made in said shifting step. 23.A storage medium product storing a program, said program including thesteps of: determining whether data corresponding to a color signal inputfrom an input device is included within an area defined by colormatching correction data for a printer; shifting data, which is notincluded in said area as a result of said determining step, to data ofthe same hue while preserving luminance so that the data after the shiftis included in said area; converting the data after the shift using thecolor matching correction data; and enlarging a color reproduction areaof the data after the conversion within a color reproducible area ofsaid printer based on an amount of the shift made in said shifting step.24. An image data processing method according to claim 2, wherein saidstep of converting the second color space point to a third color spacepoint within a color reproduction area smaller than the maximum colorreproduction area of said output means is performed using a conversiontable for color matching.
 25. An image data processing apparatusaccording to claim 5, wherein said means for converting the second colorspace point to a third color space point within a color reproductionarea smaller than the maximum color reproduction area of said outputmeans is performed using a conversion table for color matching.
 26. Aprogram product containing a program, said program including the stepsof: scale-down shifting a first color space point outside a maximumcolor reproduction area of output means to a second color space pointwithin the maximum color reproduction area of said output means;computing an amount of shift by which the first color space point isshifted to the second color space point; converting the second colorspace point to a third color space point within a color reproductionarea smaller than the maximum color reproduction area of said outputmeans; and outputting an image to said output means using image dataobtained by scale-up shifting the third color space point to a fourthcolor space point within the maximum color reproduction area of saidoutput means based on the computed shift amount.